import 'package:flutter/material.dart';
import './ItemData.dart';
import './ListItem.dart';
void main() => runApp(App());

class App extends StatefulWidget {
  @override
  _AppState createState() => _AppState();
}

class _AppState extends State<App> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      title: 'CardList',
      home: Scaffold(
        appBar: AppBar(
          leading: Icon(
            Icons.menu,
            color: Colors.black,
          ),
          title: Text(
            'Google Classroom',
            style: TextStyle(
                fontSize: 24.0,
                color: Colors.black,
                fontWeight: FontWeight.w400),
          ),
          actions: <Widget>[
            Icon(
              Icons.add,
              color: Colors.black,
            ),
            Padding(
              padding: const EdgeInsets.only(left: 30, right: 20),
              child: Icon(
                Icons.more_vert,
                color: Colors.black,
              ),
            )
          ],
          backgroundColor: Colors.white,
        ),
        body:Padding(padding: const EdgeInsets.only(right: 16.0,left: 16.0,),child: ListView
            .builder(itemCount: list.length,
            itemBuilder: (context, index) {
          return ListItem(list[index]);
        }),)

      ),
    );
  }
}
